//
//  AWNoticeMessage.h
//  AtWork2
//
//  Created by lucas on 15/5/8.
//  Copyright (c) 2015年 Foreveross. All rights reserved.
//

#import "AWMessage.h"

/**
 *  通知类型
 */
typedef NS_ENUM(NSUInteger, AWNoticeMessageType){
    
    /** 单聊 */
    AWNoticeMessageTypeP2P = 0,
    
    /** 讨论组 */
    AWNoticeMessageTypeDiscussion,
    
    /** 系统其他通知 */
    AWNoticeMessageTypeSystem
};

static inline AWNoticeMessageType parseNoticeMessageType(NSString *type) {
    if ([type.uppercaseString isEqualToString:AWMessageKDiscussion]) {
        return AWNoticeMessageTypeDiscussion;
    }
    if ([type.uppercaseString isEqualToString:AWMessageKP2P]) {
        return AWNoticeMessageTypeP2P;
    }
    return NSNotFound;
}

/**
 *  通知消息。
 */
@interface AWNoticeMessage : AWMessage

@property (nonatomic, assign) AWNoticeMessageType noticeMessageType;

@end
